import { $post } from '@/utils/request';
import {
  ReceiveDirectQueryParam,
  MdDtTopSearchDataParam,
  DeliveryDataParam,
} from './types';

// 接收直配查询
export function receiveDirectQuery(data: ReceiveDirectQueryParam) {
  return $post('/DirectDeliveryRest/searchByPage', data);
}

// 接收直配
export function directDelivery(data: any) {
  return $post('/DirectDeliveryRest/directDelivery', data);
}

// 配送任务--回传按钮
export function mdDtTopSearchData(data: MdDtTopSearchDataParam) {
  return $post('/MsDeliveryPackageInfoRest/waitingDispatch', data);
}

// 配送任务--回传按钮--ao包数据
export function topSearchAoData(data: any) {
  return $post('/MsDeliveryPackageInfoRest/queryNoDaliyTimeAoByCarCode', data);
}

// 配送任务--回传按钮--物料配送数据
export function topSearchMatchData(data: any) {
  return $post('/MsDeliveryPackageInfoRest/querySendMaterial', data);
}

// 配送任务--配送按钮
export function deliveryDataQuery(data: DeliveryDataParam) {
  return $post('/MsDeliveryPackageInfoRest/insertMsMatchInfo', data);
}

// 配送任务--每日数据
export function dailyDeliveryDataQuery() {
  return $post('/MsDeliveryPackageInfoRest/countSearch', {});
}

// 配送任务--托盘装车
export function palletInCarFunc(data: DeliveryDataParam) {
  return $post('/MsDeliveryPackageInfoRest/palletInCar', data);
}
